<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Caffe: include/caffe/layers/recurrent_layer.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Caffe
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4b7f3da7c7b4301d805dae0326fb91b7.html">caffe</a></li><li class="navelem"><a class="el" href="dir_b9606a76d4acbf8f90a06a4a51ec8b9e.html">layers</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">recurrent_layer.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef CAFFE_RECURRENT_LAYER_HPP_</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define CAFFE_RECURRENT_LAYER_HPP_</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;caffe/blob.hpp&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;caffe/common.hpp&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;caffe/layer.hpp&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;caffe/net.hpp&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;caffe/proto/caffe.pb.h&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;caffe/util/format.hpp&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecaffe.html">caffe</a> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Dtype&gt; <span class="keyword">class </span>RecurrentLayer;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Dtype&gt;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">class </span>RecurrentLayer : <span class="keyword">public</span> Layer&lt;Dtype&gt; {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keyword">explicit</span> RecurrentLayer(<span class="keyword">const</span> LayerParameter&amp; param)</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      : <a class="code" href="classcaffe_1_1Layer.html#a7b4e4ccea08c7b8b15acc6829d5735f6">Layer</a>&lt;Dtype&gt;(param) {}</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a4eec13bfbe23b1e3eb2bbc4652bd6952">LayerSetUp</a>(<span class="keyword">const</span> vector&lt;Blob&lt;Dtype&gt;*&gt;&amp; bottom,</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;      <span class="keyword">const</span> vector&lt;Blob&lt;Dtype&gt;*&gt;&amp; top);</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#aba6011a9cbb18e38a8596aa5dbb44723">Reshape</a>(<span class="keyword">const</span> vector&lt;Blob&lt;Dtype&gt;*&gt;&amp; bottom,</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;      <span class="keyword">const</span> vector&lt;Blob&lt;Dtype&gt;*&gt;&amp; top);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> Reset();</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#afc0b925b8bf94a795c9ff84f411e70a3">   36</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classcaffe_1_1RecurrentLayer.html#afc0b925b8bf94a795c9ff84f411e70a3">type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="stringliteral">&quot;Recurrent&quot;</span>; }</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#ac31b705bc02d333ae768f7c2184fbfae">   37</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#ac31b705bc02d333ae768f7c2184fbfae">MinBottomBlobs</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keywordtype">int</span> min_bottoms = 2;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classcaffe_1_1Layer.html#a7ed12bb2df25c887e41d7ea9557fc701">layer_param_</a>.recurrent_param().expose_hidden()) {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;      vector&lt;string&gt; inputs;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      this-&gt;<a class="code" href="classcaffe_1_1RecurrentLayer.html#a9d9dab800f838e38651678718adfbbf6">RecurrentInputBlobNames</a>(&amp;inputs);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;      min_bottoms += inputs.size();</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    }</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keywordflow">return</span> min_bottoms;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  }</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#a983e1ead91884f9d2049a3000254961c">   46</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a983e1ead91884f9d2049a3000254961c">MaxBottomBlobs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#ac31b705bc02d333ae768f7c2184fbfae">MinBottomBlobs</a>() + 1; }</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#a4cb9032f0942c0fef5f6c7094c7b2ab8">   47</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a4cb9032f0942c0fef5f6c7094c7b2ab8">ExactNumTopBlobs</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">int</span> num_tops = 1;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classcaffe_1_1Layer.html#a7ed12bb2df25c887e41d7ea9557fc701">layer_param_</a>.recurrent_param().expose_hidden()) {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;      vector&lt;string&gt; outputs;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      this-&gt;<a class="code" href="classcaffe_1_1RecurrentLayer.html#a5fd43ae201c4284a1cc3d93f72702bbe">RecurrentOutputBlobNames</a>(&amp;outputs);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;      num_tops += outputs.size();</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    }</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">return</span> num_tops;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  }</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#a8d91610cc8b9615a1db4f07fe5590a37">   57</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a8d91610cc8b9615a1db4f07fe5590a37">AllowForceBackward</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> bottom_index)<span class="keyword"> const </span>{</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="comment">// Can&#39;t propagate to sequence continuation indicators.</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">return</span> bottom_index != 1;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a04a3a032c4d0be559d88865a13a2d927">FillUnrolledNet</a>(NetParameter* net_param) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a9d9dab800f838e38651678718adfbbf6">RecurrentInputBlobNames</a>(vector&lt;string&gt;* names) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#ad2c2427c11960e0b8961c31ff2f74c03">RecurrentInputShapes</a>(vector&lt;BlobShape&gt;* shapes) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a5fd43ae201c4284a1cc3d93f72702bbe">RecurrentOutputBlobNames</a>(vector&lt;string&gt;* names) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#af0b87f8e9a422338243ffeb7f16121fa">OutputBlobNames</a>(vector&lt;string&gt;* names) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a9f0e34d7534fac027c640e66f55a18d2">Forward_cpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#afb4cdbb38b24d2a2ccb14cebc4e1018b">Forward_gpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a634f73d33c81cc8f8486659998ed45c6">Backward_cpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top,</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;      <span class="keyword">const</span> vector&lt;bool&gt;&amp; propagate_down, <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#aa9b6cb6658e3bc8bfdf39441e751919a">  151</a></span>&#160;  shared_ptr&lt;Net&lt;Dtype&gt; &gt; <a class="code" href="classcaffe_1_1RecurrentLayer.html#aa9b6cb6658e3bc8bfdf39441e751919a">unrolled_net_</a>;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#a4bf3c3a87b2a740987aec46e40717907">  154</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a4bf3c3a87b2a740987aec46e40717907">N_</a>;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#a02f79bca0ccde7543ecf172b328c860f">  160</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a02f79bca0ccde7543ecf172b328c860f">T_</a>;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#a7da45d2f90a99fe6e4250ffa6a533d97">  163</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a7da45d2f90a99fe6e4250ffa6a533d97">static_input_</a>;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#a0a7a7d94ed74d4199b9d7b8445d5aadb">  169</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a0a7a7d94ed74d4199b9d7b8445d5aadb">last_layer_index_</a>;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html#abfafaacb1fece0309e750e0d307fb76e">  175</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#abfafaacb1fece0309e750e0d307fb76e">expose_hidden_</a>;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  vector&lt;Blob&lt;Dtype&gt;* &gt; recur_input_blobs_;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  vector&lt;Blob&lt;Dtype&gt;* &gt; recur_output_blobs_;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  vector&lt;Blob&lt;Dtype&gt;* &gt; output_blobs_;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  <a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>* x_input_blob_;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  <a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>* x_static_input_blob_;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;  <a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>* cont_input_blob_;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;};</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;}  <span class="comment">// namespace caffe</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="preprocessor">#endif  // CAFFE_RECURRENT_LAYER_HPP_</span></div><div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a4eec13bfbe23b1e3eb2bbc4652bd6952"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a4eec13bfbe23b1e3eb2bbc4652bd6952">caffe::RecurrentLayer::LayerSetUp</a></div><div class="ttdeci">virtual void LayerSetUp(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Does layer-specific setup: your layer should implement this function as well as Reshape. </div><div class="ttdef"><b>Definition:</b> recurrent_layer.cpp:14</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a7da45d2f90a99fe6e4250ffa6a533d97"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a7da45d2f90a99fe6e4250ffa6a533d97">caffe::RecurrentLayer::static_input_</a></div><div class="ttdeci">bool static_input_</div><div class="ttdoc">Whether the layer has a &quot;static&quot; input copied across all timesteps. </div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:163</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_ac31b705bc02d333ae768f7c2184fbfae"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#ac31b705bc02d333ae768f7c2184fbfae">caffe::RecurrentLayer::MinBottomBlobs</a></div><div class="ttdeci">virtual int MinBottomBlobs() const</div><div class="ttdoc">Returns the minimum number of bottom blobs required by the layer, or -1 if no minimum number is requi...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:37</div></div>
<div class="ttc" id="namespacecaffe_html"><div class="ttname"><a href="namespacecaffe.html">caffe</a></div><div class="ttdoc">A layer factory that allows one to register layers. During runtime, registered layers can be called b...</div><div class="ttdef"><b>Definition:</b> blob.hpp:14</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a8d91610cc8b9615a1db4f07fe5590a37"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a8d91610cc8b9615a1db4f07fe5590a37">caffe::RecurrentLayer::AllowForceBackward</a></div><div class="ttdeci">virtual bool AllowForceBackward(const int bottom_index) const</div><div class="ttdoc">Return whether to allow force_backward for a given bottom blob index. </div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:57</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a0a7a7d94ed74d4199b9d7b8445d5aadb"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a0a7a7d94ed74d4199b9d7b8445d5aadb">caffe::RecurrentLayer::last_layer_index_</a></div><div class="ttdeci">int last_layer_index_</div><div class="ttdoc">The last layer to run in the network. (Any later layers are losses added to force the recurrent net t...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:169</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a9d9dab800f838e38651678718adfbbf6"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a9d9dab800f838e38651678718adfbbf6">caffe::RecurrentLayer::RecurrentInputBlobNames</a></div><div class="ttdeci">virtual void RecurrentInputBlobNames(vector&lt; string &gt; *names) const =0</div><div class="ttdoc">Fills names with the names of the 0th timestep recurrent input Blob&amp;s. Subclasses should define this ...</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a9f0e34d7534fac027c640e66f55a18d2"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a9f0e34d7534fac027c640e66f55a18d2">caffe::RecurrentLayer::Forward_cpu</a></div><div class="ttdeci">virtual void Forward_cpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdef"><b>Definition:</b> recurrent_layer.cpp:245</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_afb4cdbb38b24d2a2ccb14cebc4e1018b"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#afb4cdbb38b24d2a2ccb14cebc4e1018b">caffe::RecurrentLayer::Forward_gpu</a></div><div class="ttdeci">virtual void Forward_gpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Using the GPU device, compute the layer output. Fall back to Forward_cpu() if unavailable. </div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a02f79bca0ccde7543ecf172b328c860f"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a02f79bca0ccde7543ecf172b328c860f">caffe::RecurrentLayer::T_</a></div><div class="ttdeci">int T_</div><div class="ttdoc">The number of timesteps in the layer&amp;#39;s input, and the number of timesteps over which to backpropagate...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:160</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a5fd43ae201c4284a1cc3d93f72702bbe"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a5fd43ae201c4284a1cc3d93f72702bbe">caffe::RecurrentLayer::RecurrentOutputBlobNames</a></div><div class="ttdeci">virtual void RecurrentOutputBlobNames(vector&lt; string &gt; *names) const =0</div><div class="ttdoc">Fills names with the names of the Tth timestep recurrent output Blob&amp;s. Subclasses should define this...</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_ad2c2427c11960e0b8961c31ff2f74c03"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#ad2c2427c11960e0b8961c31ff2f74c03">caffe::RecurrentLayer::RecurrentInputShapes</a></div><div class="ttdeci">virtual void RecurrentInputShapes(vector&lt; BlobShape &gt; *shapes) const =0</div><div class="ttdoc">Fills shapes with the shapes of the recurrent input Blob&amp;s. Subclasses should define this – see RNNL...</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_aa9b6cb6658e3bc8bfdf39441e751919a"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#aa9b6cb6658e3bc8bfdf39441e751919a">caffe::RecurrentLayer::unrolled_net_</a></div><div class="ttdeci">shared_ptr&lt; Net&lt; Dtype &gt; &gt; unrolled_net_</div><div class="ttdoc">A Net to implement the Recurrent functionality. </div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:151</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_aba6011a9cbb18e38a8596aa5dbb44723"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#aba6011a9cbb18e38a8596aa5dbb44723">caffe::RecurrentLayer::Reshape</a></div><div class="ttdeci">virtual void Reshape(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Adjust the shapes of top blobs and internal buffers to accommodate the shapes of the bottom blobs...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.cpp:183</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a634f73d33c81cc8f8486659998ed45c6"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a634f73d33c81cc8f8486659998ed45c6">caffe::RecurrentLayer::Backward_cpu</a></div><div class="ttdeci">virtual void Backward_cpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top, const vector&lt; bool &gt; &amp;propagate_down, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom)</div><div class="ttdoc">Using the CPU device, compute the gradients for any parameters and for the bottom blobs if propagate_...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.cpp:277</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_af0b87f8e9a422338243ffeb7f16121fa"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#af0b87f8e9a422338243ffeb7f16121fa">caffe::RecurrentLayer::OutputBlobNames</a></div><div class="ttdeci">virtual void OutputBlobNames(vector&lt; string &gt; *names) const =0</div><div class="ttdoc">Fills names with the names of the output blobs, concatenated across all timesteps. Should return a name for each top Blob. Subclasses should define this – see RNNLayer and LSTMLayer for examples. </div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_afc0b925b8bf94a795c9ff84f411e70a3"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#afc0b925b8bf94a795c9ff84f411e70a3">caffe::RecurrentLayer::type</a></div><div class="ttdeci">virtual const char * type() const</div><div class="ttdoc">Returns the layer type. </div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:36</div></div>
<div class="ttc" id="classcaffe_1_1Layer_html_a7b4e4ccea08c7b8b15acc6829d5735f6"><div class="ttname"><a href="classcaffe_1_1Layer.html#a7b4e4ccea08c7b8b15acc6829d5735f6">caffe::Layer::Layer</a></div><div class="ttdeci">Layer(const LayerParameter &amp;param)</div><div class="ttdef"><b>Definition:</b> layer.hpp:40</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a4cb9032f0942c0fef5f6c7094c7b2ab8"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a4cb9032f0942c0fef5f6c7094c7b2ab8">caffe::RecurrentLayer::ExactNumTopBlobs</a></div><div class="ttdeci">virtual int ExactNumTopBlobs() const</div><div class="ttdoc">Returns the exact number of top blobs required by the layer, or -1 if no exact number is required...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:47</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_abfafaacb1fece0309e750e0d307fb76e"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#abfafaacb1fece0309e750e0d307fb76e">caffe::RecurrentLayer::expose_hidden_</a></div><div class="ttdeci">bool expose_hidden_</div><div class="ttdoc">Whether the layer&amp;#39;s hidden state at the first and last timesteps are layer inputs and outputs...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:175</div></div>
<div class="ttc" id="classcaffe_1_1Layer_html_a7ed12bb2df25c887e41d7ea9557fc701"><div class="ttname"><a href="classcaffe_1_1Layer.html#a7ed12bb2df25c887e41d7ea9557fc701">caffe::Layer::layer_param_</a></div><div class="ttdeci">LayerParameter layer_param_</div><div class="ttdef"><b>Definition:</b> layer.hpp:297</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a983e1ead91884f9d2049a3000254961c"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a983e1ead91884f9d2049a3000254961c">caffe::RecurrentLayer::MaxBottomBlobs</a></div><div class="ttdeci">virtual int MaxBottomBlobs() const</div><div class="ttdoc">Returns the maximum number of bottom blobs required by the layer, or -1 if no maximum number is requi...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:46</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a4bf3c3a87b2a740987aec46e40717907"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a4bf3c3a87b2a740987aec46e40717907">caffe::RecurrentLayer::N_</a></div><div class="ttdeci">int N_</div><div class="ttdoc">The number of independent streams to process simultaneously. </div><div class="ttdef"><b>Definition:</b> recurrent_layer.hpp:154</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a04a3a032c4d0be559d88865a13a2d927"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a04a3a032c4d0be559d88865a13a2d927">caffe::RecurrentLayer::FillUnrolledNet</a></div><div class="ttdeci">virtual void FillUnrolledNet(NetParameter *net_param) const =0</div><div class="ttdoc">Fills net_param with the recurrent network architecture. Subclasses should define this – see RNNLaye...</div></div>
<div class="ttc" id="classcaffe_1_1Blob_html"><div class="ttname"><a href="classcaffe_1_1Blob.html">caffe::Blob</a></div><div class="ttdoc">A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...</div><div class="ttdef"><b>Definition:</b> blob.hpp:24</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Aug 3 2017 23:11:19 for Caffe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
